package com.ruoyi.stock.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.stock.mapper.StockInventoryCheckMapper;
import com.ruoyi.stock.domain.StockInventoryCheck;
import com.ruoyi.stock.service.IStockInventoryCheckService;
import com.ruoyi.common.core.text.Convert;

/**
 * 库存盘点记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-17
 */
@Service
public class StockInventoryCheckServiceImpl implements IStockInventoryCheckService 
{
    @Autowired
    private StockInventoryCheckMapper stockInventoryCheckMapper;

    /**
     * 查询库存盘点记录
     * 
     * @param checkId 库存盘点记录主键
     * @return 库存盘点记录
     */
    @Override
    public StockInventoryCheck selectStockInventoryCheckByCheckId(Long checkId)
    {
        return stockInventoryCheckMapper.selectStockInventoryCheckByCheckId(checkId);
    }

    /**
     * 查询库存盘点记录列表
     * 
     * @param stockInventoryCheck 库存盘点记录
     * @return 库存盘点记录
     */
    @Override
    public List<StockInventoryCheck> selectStockInventoryCheckList(StockInventoryCheck stockInventoryCheck)
    {
        return stockInventoryCheckMapper.selectStockInventoryCheckList(stockInventoryCheck);
    }

    /**
     * 新增库存盘点记录
     * 
     * @param stockInventoryCheck 库存盘点记录
     * @return 结果
     */
    @Override
    public int insertStockInventoryCheck(StockInventoryCheck stockInventoryCheck)
    {
        return stockInventoryCheckMapper.insertStockInventoryCheck(stockInventoryCheck);
    }

    /**
     * 修改库存盘点记录
     * 
     * @param stockInventoryCheck 库存盘点记录
     * @return 结果
     */
    @Override
    public int updateStockInventoryCheck(StockInventoryCheck stockInventoryCheck)
    {
        return stockInventoryCheckMapper.updateStockInventoryCheck(stockInventoryCheck);
    }

    /**
     * 批量删除库存盘点记录
     * 
     * @param checkIds 需要删除的库存盘点记录主键
     * @return 结果
     */
    @Override
    public int deleteStockInventoryCheckByCheckIds(String checkIds)
    {
        return stockInventoryCheckMapper.deleteStockInventoryCheckByCheckIds(Convert.toStrArray(checkIds));
    }

    /**
     * 删除库存盘点记录信息
     * 
     * @param checkId 库存盘点记录主键
     * @return 结果
     */
    @Override
    public int deleteStockInventoryCheckByCheckId(Long checkId)
    {
        return stockInventoryCheckMapper.deleteStockInventoryCheckByCheckId(checkId);
    }
}
